package name.fowler.refactoring.simplestore;

public class ConciseReport {

	public void report(Store store, Formatter fmt) {
		fmt.println("+---------+---------+---------+---------+---------+---------+---------");
		for (Customer cust: store.getCustomers()) {
			double totalAmount = 0;
			int frequentRenterPoints = 0;
			for (Rental each: cust.getRentals()) {
				totalAmount += each.bill();
				frequentRenterPoints += each.bonus();
			}
			fmt.println(cust.getName() + "\t" + totalAmount + "\t" + frequentRenterPoints);
		}
	}
	
}
